/* Lab 1, exercise 6
刘文骏 2023.7.7
*/
#include <system.h>

void delay(int j)
{
    int i;
    while(j != 0)
    {
        for(i=5435; i != 0; i--);
        j--;
    }
}


void main()
{
    trisb = 0x00; // set all bits in port B as outputs
    while(1)
    {
        portb=0xff; // LEDs on
        delay(100); // wait a bit
        portb = 0; // LEDs off
        delay(100); // wait a bit
    }
}